home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue.arc / TVBFIND.C < prev    next >
C/C++ Source or Header  |  1990-01-09  |  1KB  |  40 lines

  1. /*================================================*/
  2. /* TVBFIND.C                                      */
  3. /*                                                */
  4. /* (c) Copyright 1988 Ralf Brown                  */
  5. /*     All Rights Reserved                        */
  6. /* May be freely copied for noncommercial use,    */
  7. /* provided that this copyright notice remains    */
  8. /* intact and any changes are indicated in the    */
  9. /* comment blocks preceding functions             */
  10. /*================================================*/
  11.  
  12. #include <string.h>
  13. #include "tvapi.h"
  14.  
  15. /*================================================*/
  16. /* TVmbx_find   find a mailbox by name            */
  17. /*   Ralf Brown 4/8/88                            */
  18. /*================================================*/
  19.  
  20. OBJECT pascal TVmbx_find(char *name)
  21. {
  22.    int len = strlen(name) ;
  23.    unsigned int old_DS = _DS ;
  24.    unsigned int new_DS ;
  25.  
  26.    _ES = FP_SEG((char far *)name) ;
  27.    _DI = FP_OFF((char far *)name) ;
  28.    _CX = len ;
  29.    _AX = 0xDE0E ;
  30.    geninterrupt(0x15) ;
  31.    new_DS = _DS ;
  32.    _DS = old_DS ;
  33.    if (_BX)
  34.       return (OBJECT) MK_FP(new_DS,_SI) ;
  35.    else
  36.       return NIL ;
  37. }
  38.  
  39. /* End of TVBFIND.C */
  40.